home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / cfuncs.zip / PCB.H < prev    next >
Text File  |  1991-01-29  |  16KB  |  287 lines

  1. /*****************************************************************************
  2.  *
  3.  *                               DCAAPI.h
  4.  *
  5.  *****************************************************************************
  6.  *
  7.  *     Include file describing the Lattice 'C' interface to the HLLAPI.
  8.  *
  9.  *     (C) Copyright Digital Communications Associates, Inc. 1987.
  10.  *     All Rights Reserved.
  11.  *
  12.  ****************************************************************************/
  13.  
  14. /*
  15.  * PCB_request_code values:
  16.  */
  17. #define PCB_GATEWAY             0
  18. #define PCB_CONNECT             1
  19. #define PCB_DISCONNECT          2
  20. #define PCB_SEND_KEY            3
  21. #define PCB_WAIT                4
  22. #define PCB_COPYPS              5
  23. #define PCB_SEARCH              6
  24. #define PCB_GET_POSITION        7
  25. #define PCB_COPY_STRING         8
  26. #define PCB_SET_PARAMS          9
  27. #define PCB_QUERY               10
  28. #define PCB_RESERVE             11
  29. #define PCB_RELEASE             12
  30. #define PCB_COPYOIA             13
  31. #define PCB_GET_FLD_ATTR        14
  32. #define PCB_COPY_TO_PS          15
  33. #define PCB_WSCTRL              16
  34. #define PCB_PAUSE               18
  35. #define PCB_QUERY_SYSTEM        20
  36. #define PCB_RESET_SYSTEM        21
  37. #define PCB_QUERY_SESS_STAT     22
  38. #define PCB_START_HOST_NTFY     23
  39. #define PCB_QUERY_UPDATE        24
  40. #define PCB_STOP_HOST_NTFY      25
  41. #define PCB_FLD_SEARCH          30
  42. #define PCB_FIND_FLD_POS        31
  43. #define PCB_FIND_FLD_LEN        32
  44. #define PCB_COPY_STR_TO_FLD     33
  45. #define PCB_COPY_FLD_TO_STR     34
  46. #define PCB_SEND_FILE           90
  47. #define PCB_RECV_FILE           91
  48. #define PCB_INVOKE_PGM          92
  49. #define PCB_DOS_REDIRECT        93
  50. #define PCB_CONVERT             99
  51. #define PCB_Q_DCA               255
  52.  
  53.  
  54.  
  55.  
  56. /*
  57.  * PCB_return_code values:
  58.  */
  59. /*      1 - Connect Presentation Space */
  60. #define PCB_RC_CONNECT_OK                   0       /* successful */
  61. #define PCB_RC_CONNECT_FAIL_SESSION         1       /* failure, unable to connect */
  62. #define PCB_RC_CONNECT_OK_WSCTRL            3       /* successful, connected to WSCTRL */
  63. #define PCB_RC_CONNECT_OK_BUSY              4       /* successful, but busy  */
  64. #define PCB_RC_CONNECT_OK_LOCKED            5       /* successful, but locked */
  65. #define PCB_RC_CONNECT_FAIL_SYSTEM          9       /* failure, system error */
  66.  
  67. /*      2 - Disconnect Presentation Space */
  68. #define PCB_RC_DISCONNECT_OK                0       /* successful */
  69. #define PCB_RC_DISCONNECT_FAIL_PROGRAM      1       /* failure, program not connected */
  70. #define PCB_RC_DISCONNECT_FAIL_SYSTEM       9       /* failure, system error */
  71.  
  72. /*      3 - Send Key */
  73. #define PCB_RC_SEND_KEY_OK                  0       /* successful */
  74. #define PCB_RC_SEND_KEY_FAIL_SESSION        1       /* failure, not connected to a valid session */
  75. #define PCB_RC_SEND_KEY_FAIL_PARAMS         2       /* failure, bad parameter sent */
  76. #define PCB_RC_SEND_KEY_OK_WSCTRL           3       /* successful, in WSCTRL */
  77. #define PCB_RC_SEND_KEY_FAIL_BUSY           4       /* failure, session busy */
  78. #define PCB_RC_SEND_KEY_FAIL_LOCKED         5       /* failure, session locked */
  79. #define PCB_RC_SEND_KEY_FAIL_SYSTEM         9       /* failure, system error */
  80.  
  81. /*      4 - Wait */
  82. #define PCB_RC_WAIT_OK                      0       /* successful */
  83. #define PCB_RC_WAIT_FAIL_SESSION            1       /* failure, not connected to a valid session */
  84. #define PCB_RC_WAIT_OK_WSCTRL               3       /* successful, in WSCTRL */
  85. #define PCB_RC_WAIT_FAIL_BUSY               4       /* failure, session  busy  */
  86. #define PCB_RC_WAIT_FAIL_LOCKED             5       /* failure, session locked */
  87. #define PCB_RC_WAIT_FAIL_SYSTEM             9       /* failure, system error */
  88.  
  89. /*      5 - Copy Presentation Space */
  90. #define PCB_RC_COPYPS_OK                    0       /* successful */
  91. #define PCB_RC_COPYPS_FAIL_SESSION          1       /* failure, not connected to a valid session */
  92. #define PCB_RC_COPYPS_FAIL_PARAMS           2       /* failure, invalid length */
  93. #define PCB_RC_COPYPS_FAIL_WSCTRL           3       /* failure, in WSCTRL */
  94. #define PCB_RC_COPYPS_OK_BUSY               4       /* successful, session  busy  */
  95. #define PCB_RC_COPYPS_OK_LOCKED             5       /* successful, session locked */
  96. #define PCB_RC_COPYPS_FAIL_SYSTEM           9       /* failure, system error */
  97.  
  98. /*      6 - Search Presentation Space */
  99. #define PCB_RC_SEARCH_OK                    0       /* successful */
  100. #define PCB_RC_SEARCH_FAIL_SESSION          1       /* failure, never connected to ps */
  101. #define PCB_RC_SEARCH_FAIL_PARAMS           2       /* failure, bad parameter */
  102. #define PCB_RC_SEARCH_FAIL_POSITION         7       /* failure, invalid position */
  103. #define PCB_RC_SEARCH_FAIL_SYSTEM           9       /* failure, system error */
  104. #define PCB_RC_SEARCH_FAIL_NOT_FND         24      /* failure, string not found */
  105.  
  106. /*      7 - Query Cursor Location */
  107. #define PCB_RC_GETPOS_OK                    0       /* successful */
  108. #define PCB_RC_GETPOS_FAIL_SESSION          1       /* failure, not connected */
  109. #define PCB_RC_GETPOS_FAIL_WSCTRL           3       /* failure, connected to wsctrl */
  110. #define PCB_RC_GETPOS_FAIL_SYSTEM           9       /* system error */
  111.  
  112. /*      8 - Copy Presentation Space to String */
  113. #define PCB_RC_COPY_STRING_OK               0       /* successful */
  114. #define PCB_RC_COPY_STRING_FAIL_SESSION     1       /* failure, not connected */
  115. #define PCB_RC_COPY_STRING_FAIL_PARAMS      2       /* failure, bad parameter */
  116. #define PCB_RC_COPY_STRING_FAIL_WSCTRL      3       /* failure, in WSCTRL */
  117. #define PCB_RC_COPY_STRING_OK_BUSY          4       /* successful, session  busy  */
  118. #define PCB_RC_COPY_STRING_OK_LOCKED        5       /* successful, session locked */
  119. #define PCB_RC_COPY_STRING_FAIL_POS         7       /* failure, invalid position */
  120. #define PCB_RC_COPY_STRING_FAIL_SYSTEM      9       /* failure, system error */
  121.  
  122. /*      9 - Set Session Parameters */
  123. #define PCB_RC_SET_PARAMS_OK                0       /* successful */
  124. #define PCB_RC_SET_PARAMS_FAIL_PARAMS       2       /* failure, bad parameter length */
  125. #define PCB_RC_SET_PARAMS_FAIL_SYSTEM       9       /* failure, system error */
  126.  
  127. /* 10 - Query Sessions */
  128. #define PCB_RC_QUERY_OK                     0       /* successful */
  129. #define PCB_RC_QUERY_FAIL_PARAMS            2       /* failure, bad parameters */
  130. #define PCB_RC_QUERY_FAIL_SYTSTEM           9       /* failure, system error */
  131.  
  132. /* 11 - Reserve */
  133. #define PCB_RC_RESERVE_OK                   0       /* successful */
  134. #define PCB_RC_RESERVE_FAIL_SESSION         1       /* failure, not connected to a valid session */
  135. #define PCB_RC_RESERVE_FAIL_LOCKED          5       /* failure, session locked */
  136. #define PCB_RC_RESERVE_FAIL_SYSTEM          9       /* failure, system error */
  137.  
  138. /* 12 - Release */
  139. #define PCB_RC_RELEASE_OK                   0       /* successful */
  140. #define PCB_RC_RELEASE_FAIL_SESSION         1       /* failure, not connected to a valid session */
  141. #define PCB_RC_RELEASE_FAIL_SYSTEM          9       /* failure, system error */
  142.  
  143. /* 13 - Copy OIA */
  144. #define PCB_RC_COPYOIA_OK                   0       /* successful */
  145. #define PCB_RC_COPYOIA_FAIL_SESSION         1       /* failure, not connected to a valid session */
  146. #define PCB_RC_COPYOIA_FAIL_PARAMS          2       /* failure, invalid length */
  147. #define PCB_RC_COPYOIA_INCOMPL_BUSY         4       /* copy incomplete, session  busy  */
  148. #define PCB_RC_COPYOIA_INCOMPL_LOCKED       5       /* copy incomplete, session locked */
  149. #define PCB_RC_COPYOIA_FAIL_SYSTEM          9       /* failure, system error */
  150.  
  151. /* 14 - Query Field Attribute */
  152. #define PCB_RC_GETFLDATTR_OK                0       /* successful */
  153. #define PCB_RC_GETFLDATTR_FAIL_SESSION      1       /* failure, not connected to a valid session */
  154. #define PCB_RC_GETFLDATTR_FAIL_POS          7       /* failure, invalid position */
  155.  
  156. /* 15 - Copy String to Presentation Space   */
  157. #define PCB_RC_COPY_TO_PS_OK                0       /* successful, at least one byte copied */
  158. #define PCB_RC_COPY_TO_PS_FAIL_SESSION      1       /* failure, not connected to a valid session */
  159. #define PCB_RC_COPY_TO_PS_FAIL_BUSY         2       /* failure, none copied, keyboard busy  */
  160. #define PCB_RC_COPY_TO_PS_FAIL_LOCKED       3       /* failure, none copied, keyboard locked */
  161. #define PCB_RC_COPY_TO_PS_FAIL_PROT         4       /* failure, none copied, target ps is protected */
  162. #define PCB_RC_COPY_TO_PS_FAIL_ATTR         5       /* failure, none copied, copying of field attrb not allowed */     
  163. #define PCB_RC_COPY_TO_PS_OK_TRUNCATED      6       /* Successful, at least 1 copied, at least 1 not copied */
  164. #define PCB_RC_COPY_TO_PS_FAIL_POSITION     7       /* failure, invalid position */
  165. #define PCB_RC_COPY_TO_PS_FAIL_SYSTEM       9       /* failure, system error */
  166.  
  167. /* 16 - WS Ctrl */
  168. #define PCB_RC_WSCTRL_OK                    0       /* successful */
  169. #define PCB_RC_WSCTRL_FAIL_SESSION          1       /* failure, invalid session id */
  170. #define PCB_RC_WSCTRL_FAIL_PARAMS           2       /* failure, bad parameters */
  171. #define PCB_RC_WSCTRL_FAIL_WSC_OWNED        3       /* failure, WSC is owned by another session */
  172. #define PCB_RC_WSCTRL_FAIL_LOCKED           5       /* failure, target is inhibited or protected */
  173. #define PCB_RC_WSCTRL_FAIL_SPEC             6       /* failure, WSC is invalid */
  174. #define PCB_RC_WSCTRL_FAIL_SYSTEM           9       /* failure, system error */
  175.  
  176. /* 18 - Pause */
  177. #define PCB_RC_PAUSE_OK                     0       /* successful */
  178. #define PCB_RC_PAUSE_FAIL_SYSTEM            9       /* failure, system error */
  179. #define PCB_RC_PAUSE_OK_HOST_NOTIFY        26       /* successful, host ps or oia has changed */
  180.  
  181. /* 20 - Query System */
  182. #define PCB_RC_QUERY_SYS_OK                 0       /* successful */
  183. #define PCB_RC_QUERY_SYS_FAIL_PARAMS        2       /* failure, bad parameters */
  184. #define PCB_RC_QUERY_SYS_FAIL_SYSTEM        9       /* failure, system error */
  185.  
  186. /* 21 - Reset System */
  187. #define PCB_RC_RESET_SYSTEM_OK              0       /* successful */
  188. #define PCB_RC_RESET_SYSTEM_FAIL_SYSTEM     9       /* failure, system error */
  189.  
  190. /* 22 - Query Session Status */
  191. #define PCB_RC_QUERY_SESS_OK                0       /* successful */
  192. #define PCB_RC_QUERY_SESS_FAIL_SESSION      1       /* failure, invalid session */
  193. #define PCB_RC_QUERY_SESS_FAIL_PARAMS       2       /* failure, bad parameters */
  194. #define PCB_RC_QUERY_SESS_FAIL_WSCTRL       3        /* failure, WSC is invalid */
  195. #define PCB_RC_QUERY_SESS_FAIL_SYSTEM       9       /* failure, system error */
  196.  
  197. /* 23 - Start Host Notification */
  198. #define PCB_RC_START_H_NTFY_OK              0       /* successful */
  199. #define PCB_RC_START_H_NTFY_FAIL_SESS       1       /* failure, invalid session */
  200. #define PCB_RC_START_H_NTFY_FAIL_PARAMS     2       /* failure, bad parameters */
  201. #define PCB_RC_START_H_NTFY_FAIL_SYS        9       /* failure, system error */
  202.  
  203. /* 24 - QUERY Host Update */
  204. #define PCB_RC_QUERY_UPDATE_OK              0       /* successful, no updates */
  205. #define PCB_RC_QUERY_UPDATE_FAIL_SESS       1       /* failure, invalid session */
  206. #define PCB_RC_QUERY_UPDATE_FAIL_NO_HN      8       /* failure, no previous Start HN issued */
  207. #define PCB_RC_QUERY_UPDATE_FAIL_SYS        9       /* failure, system error */
  208. #define PCB_RC_QUERY_UPDATE_OK_OIA         21       /* successful, OIA updated */
  209. #define PCB_RC_QUERY_UPDATE_OK_PS          22       /* successful, ps updated */
  210. #define PCB_RC_QUERY_UPDATE_OK_BOTH        23       /* successful, both updated */
  211.  
  212. /* 25 - Stop Host Notification */
  213. #define PCB_RC_STOP_H_NTFY_OK               0       /* successful */
  214. #define PCB_RC_STOP_H_NTFY_FAIL_SESS        1       /* failure, invalid session */
  215. #define PCB_RC_STOP_H_NTFY_FAIL_NO_HN       8       /* failure, no previous Start HN issued */
  216. #define PCB_RC_STOP_H_NTFY_FAIL_SYS         9       /* failure, system error */
  217.  
  218. /* 30 - Search Field */
  219. #define PCB_RC_SEARCH_FLD_OK                0       /* successful */
  220. #define PCB_RC_SEARHC_FLD_FAIL_SESS         1       /* failure, invalid session */
  221. #define PCB_RC_SEARCH_FLD_FAIL_POS          7       /* failure, invalid position */
  222. #define PCB_RC_SEARCH_FLD_FAIL_SYS          9       /* failure, system error */
  223. #define PCB_RC_SEARCH_FLD_FAIL_NOT_FND     24       /* failure, string not found */
  224.  
  225. /* 31 - Find Field Position */
  226. #define PCB_RC_FND_FLD_POS_OK               0       /* successful */
  227. #define PCB_RC_FND_FLD_POS_FAIL_SESS        1       /* failure, invalid session */
  228. #define PCB_RC_FND_FLD_POS_FAIL_PARAMS      2       /* failure, bad parameters */
  229. #define PCB_RC_FND_FLD_POS_FAIL_POS         7       /* failure, invalid position */
  230. #define PCB_RC_FND_FLD_POS_FAIL_SYS         9       /* failure, system error */
  231. #define PCB_RC_FND_FLD_POS_FAIL_NOTFND     24       /* failure, string not found */
  232.  
  233. /* 32 - Find Field Length */
  234. #define PCB_RC_FND_FLD_LEN_OK               0       /* successful */
  235. #define PCB_RC_FND_FLD_LEN_FAIL_SESS        1       /* failure, invalid session */
  236. #define PCB_RC_FND_FLD_LEN_FAIL_PARAMS      2       /* failure, bad parameters */
  237. #define PCB_RC_FND_FLD_LEN_FAIL_POS         7       /* failure, invalid position */
  238. #define PCB_RC_FND_FLD_LEN_FAIL_SYS         9       /* failure, system error */
  239. #define PCB_RC_FND_FLD_LEN_FAIL_NOTFND     24       /* failure, string not found */
  240.  
  241. /* 33 - Copy String to Field */
  242. #define PCB_RC_COPY_STRTOFLD_OK             0       /* successful */
  243. #define PCB_RC_COPY_STRTOFLD_FAIL_SESS      1       /* failure, invalid session */
  244. #define PCB_RC_COPY_STRTOFLD_FAIL_BUSY      2       /* failure, none copied, keyboard busy  */
  245. #define PCB_RC_COPY_STRTOFLD_FAIL_LOCKED    3       /* failure, none copied, keyboard locked */
  246. #define PCB_RC_COPY_STRTOFLD_FAIL_PROT      4       /* failure, none copied, target ps is protected */
  247. #define PCB_RC_COPY_STRTOFLD_FAIL_ATTR      5       /* failure, none copied, copying of field attrb not allowed */     
  248. #define PCB_RC_COPY_STRTOFLD_OK_SIZE        6       /* successful, length not equal to fld size */
  249. #define PCB_RC_COPY_STRTOFLD_FAIL_POS       7       /* failure, invalid position */
  250. #define PCB_RC_COPY_STRTOFLD_FAIL_SYS       9       /* failure, system error */
  251.  
  252. /* 34 - Copy Field to String */
  253. #define PCB_RC_COPY_FLDTOSTR_OK             0   /* successful */
  254. #define PCB_RC_COPY_FLDTOSTR_FAIL_SESS      1   /* failure, invalid session */
  255. #define PCB_RC_COPY_FLDTOSTR_FAIL_PARMS     2   /* failure, invalid parameters */
  256. #define PCB_RC_COPY_FLDTOSTR_OK_SIZE        6   /* successful, length not equal to fld size */
  257. #define PCB_RC_COPY_FLDTOSTR_FAIL_POS       7   /* failure, invalid position */
  258. #define PCB_RC_COPY_FLDTOSTR_FAIL_SYS       9   /* failure, system error */
  259.  
  260. /* 90 - Send File - other return codes are returned from Send */
  261. #define PCB_RC_SEND_FILE_FAIL_PARAMS        2   /* failure, bad parameters */
  262. #define PCB_RC_SEND_FILE_FAIL_SYSTEM        9   /* failure, system error */
  263.  
  264. /* 91 - Receive File - other return codes are returned from Receive */
  265. #define PCB_RC_RECV_FILE_FAIL_PARAMS        2   /* failure, bad parameters */
  266. #define PCB_RC_RECV_FILE_FAIL_SYSTEM        9   /* failure, system error */
  267.  
  268. /* 90 through 93 - Invoke DOS programs - DOS Return Codes */
  269. #define PCB_RC_DOS_FAIL_INV_FUNC          301   /* failure, invalid function number */
  270. #define PCB_RC_DOS_FAIL_FILE_NOT_FND      302   /* failure, file not found */
  271. #define PCB_RC_DOS_FAIL_PATH_NOT_FND      303   /* failure, path not found */
  272. #define PCB_RC_DOS_FAIL_NO_ACCESS         305   /* failure, access denied */
  273. #define PCB_RC_DOS_FAIL_INSUFF_MEMORY     308   /* failure, insufficient memory */
  274. #define PCB_RC_DOS_FAIL_INV_ENVIRON       310   /* failure, invalid environment */
  275. #define PCB_RC_DOS_FAIL_INV_FORMAT        311   /* failure, invalid format */
  276.  
  277. /* 99 - Convert Position or RowCol */
  278. #define PCB_RC_CONVERT_FAIL_INPUT           0   /* failed, bad input */
  279. #define PCB_RC_CONVERT_FAIL_SESSION      9998   /* failed, invalid session */
  280. #define PCB_RC_CONVERT_FAIL_PARAMS       9999   /* failed, invalid parameters */
  281.  
  282. /* 255 - DCA query */
  283. #define PCB_RC_DCA_QUERY_OK                 0   /* DCA Query - successful */
  284.  
  285. /* Miscellaneous */
  286. #define PCB_VALIDATION_FAILURE              2   /* invalid pcb passed */
  287.